package com.sq.shortlink.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sq.shortlink.admin.common.convension.result.Result;
import com.sq.shortlink.admin.remoto.ShortLinkRemoteService;
import com.sq.shortlink.admin.remoto.dto.req.ShortLinkStatsAccessRecordReqDTO;
import com.sq.shortlink.admin.remoto.dto.resp.ShortLinkStatsAccessRecordRespDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 短链接监控控制层
 * @author quan
 */
@RestController
@RequestMapping("/api/short-link/admin/v1")
public class ShortLInkStatsController {

    private final ShortLinkRemoteService shortLinkRemoteService = new ShortLinkRemoteService() {
    };


    @GetMapping("/stats/access-record")
    public Result<IPage<ShortLinkStatsAccessRecordRespDTO>> listShortLinkStatsAccessRecord(ShortLinkStatsAccessRecordReqDTO requestParam){
        return shortLinkRemoteService.listShortLinkStatsAccessRecord(requestParam);
    }


}
